home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
PowerPlant
/
BlueLibrary Pack1 v1.1
/
BlueLibrary Pack1 ƒ
/
BD Common ƒ
/
CScrollingTextPane.h
< prev
next >
Wrap
Text File
|
1996-06-14
|
2KB
|
80 lines
// ===========================================================================
// CScrollingTextPane.h
// Written by Christophe Causer
// ©1996 BlueDays Software. All Rights Reserved.
//
// You may use this class in any non-commercial program without
// permission. The only restriction is that you must credit the
// author in your about box. For commercial use, please contact
// the author at the email address below.
//
// Send bug-reports and comments to bluedays@kagi.com
//
// ===========================================================================
#pragma once
#include <LPane.h>
#include <LPeriodical.h>
#include <UGWorld.h>
class CScrollingTextPane : public LPane,
public LPeriodical {
public:
enum {class_ID = 'SrlT'};
static CScrollingTextPane* CreateFromStream(LStream *inStream);
// Life & Death
CScrollingTextPane();
CScrollingTextPane(
const SPaneInfo& inPaneInfo,
ResIDT inTextResID,
ResIDT inTxtrResID,
Boolean inPreserveBackground = false,
Boolean inInverted = false,
Int16 inAnimationTicks = 2);
CScrollingTextPane( LStream *inStream);
virtual ~CScrollingTextPane();
// Animation
virtual void SpendTime(const EventRecord &inMacEvent);
protected:
virtual void FinishCreateSelf();
virtual void DrawSelf();
typedef enum AnimateState {
animate_Waiting,
animate_Active,
animate_Done
} AnimateState;
LGWorld *mCreditGWorld;
LGWorld *mDrawGWorld;
LGWorld *mBackGWorld;
Int16 mTextResID;
Int16 mTxtrResID;
Boolean mPreserveBackground;
Boolean mInverted;
Int16 mAnimationTicks;
Int32 mNextAnimationTicks;
TEHandle mTE;
Int16 mTextHeight;
Int32 mCurrentGreyLevel;
Int32 mGreyFadeChange;
Rect mDisplayRect;
AnimateState mAnimCreditsFade;
AnimateState mAnimCreditsScroll;
// Manage the credits
void FetchCreditInfo(
Int16 inWidth);
void DrawCredits(
Rect &inCreditRect);
void DrawToScreen();
};